#define _CRT_SECURE_NO_WARNINGS 
#include<stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAX_STUDENTS 100

 struct Student_health
{
    int id;
    char name[50];
    char sex[4];
    int age;
    char department[50];
    int high;
    float weight;
    float chest;
    int date;
};
 struct Student_medical
 {
    char diagnose;
    int date;
 };

void display_mun()
{
	printf("*******************\n");
	printf("*                 *\n");
	printf("*  1 登记学生信息 *\n");
	printf("*  2 删除学生信息 *\n");
	printf("*  3 修改学生信息 *\n");
	printf("*  4 查询学生信息 *\n");
	printf("*  5 统计学生信息 *\n");
	printf("*                 *\n");
	printf("*******************\n");
}

void dengji()
{
Student_health new_examination;
printf("输入学生的学号:");
scanf("%d",&new_examination.id);
printf("请输入学生姓名：");
scanf("%s",&new_examination.name);
printf("请输入学生性别：");
scanf("%s",&new_examination.sex);
printf("请输入学生年龄：");
scanf("%d",&new_examination.age);
printf("请输入学生系别：");
scanf("%s",&new_examination.department);
printf("请输入学生身高：");
scanf("%d",&new_examination.high);
printf("请输入学生体重：");
scanf("%f",&new_examination.weight);
printf("请输入学生胸围：");
scanf("%f",&new_examination.chest);
printf("请输入学生日期：");
scanf("%d",&new_examination.date);
printf("请输入学生日期：");
Student_medical new_history;
printf("请输入学生诊断：");
scanf("%d",&new_history.diagnose);
printf("请输入学生诊断日期：");
scanf("%d",&new_history.date);
printf("学生信息添加成功");
}

void xiugai()
{
	
}

void shangchu()
{
    int index=-1;
    int examination_id;
	int i;
	printf("输入学生的学号:");
	scanf("%d", &examination_id);
	for(i=0;i<num_examination;i++)
	{
		if(examination[i].id == examination_id)
		{
			index=i;
			break;
		}
	}
    if(index==-1)
    {
	    printf("学号不存在");
	    return ;
    }
    for(i=index;i<num_examination -l;i++)
    {
	    examination[i]= examination[i+1];
    }

    num_examination--;
	printf("删除学生信息成功\n");
}

void chaxun()
{
	
}

void tongji()
{
	
}

int main()
{
    Student_health examination [MAX_STUDENTS];
    Student_medical history [MAX_STUDENTS];
    int num_examination=0;
    int num_history=0;
	while(1)
	{
	system("cls");
	display_mun();
	int choice;
	scanf("%d",&choice);
	switch(choice)
	{
		case 1:{
			dengji();
			break;
		}
		case 2:{
			xiugai();
			break;
		}
		case 3:{
			shangchu();
			break;
		}
		case 4:{
			chaxun();
			break;
		}
		case 5:{
			tongji();
			break;
	    }
	    default:{
	    	printf("输入错误\n");
			break;
		}
	    	
	}
	system("pause");
	}
	return 0;
}